#pragma once

#include "../umlmodel_global.h"

#include <memory>
#include <vector>

#include "Classifier.h"

using std::make_shared;
using std::shared_ptr;
using std::vector;

namespace uml {
class Property;

/// <summary>
/// Signal
/// A Signal is a specification of a kind of communication between objects in which
/// a reaction is asynchronously triggered in the receiver without a reply.
/// </summary>
class UMLMODEL_EXPORT Signal : public Classifier {

public: // Constructors and destructors
    explicit Signal(const QString& umlType="uml::Signal");

public: // JsonSerializable override
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    void toJson(QJsonObject& json) override;

public: // Properties
    /// <summary>
    /// ownedAttributes getter
    /// The attributes owned by the Signal.
    /// </summary>
    vector<shared_ptr<Property>>& ownedAttributes();

private: // Fields
    /// <summary>
    /// ownedAttributes
    /// The attributes owned by the Signal.
    /// </summary>
    vector<shared_ptr<Property>> ownedAttributes_;

};

} // namespace uml
